#include "TCPServerPacketReaderWriter.h"

namespace network
{

TCPServerPacketReaderWriter::TCPServerPacketReaderWriter(StreamSocket& socket)
: _socket(socket)
{
}

TCPServerPacketReaderWriter::~TCPServerPacketReaderWriter()
{
}

int TCPServerPacketReaderWriter::read(char* pBuff, const Int32 len)
{
	return _socket.receiveBytes(pBuff, len, 0);
}

int TCPServerPacketReaderWriter::write(const char* pBuff, const Int32 len)
{
	return _socket.sendBytes(pBuff, len);
}

}
